<template>
  <FormItem label="字体">
    <Select :value="value" @on-change="v=>{changeValue(v)}">
      <Option v-for="(unit,order) of options" :key="order" :value="unit.value">{{unit.label}}</Option>
    </Select>
  </FormItem>
</template>

<script>
export default {
  props: ['value'],
  data () {
    return {
      options: [
        {
          label: '微软雅黑',
          value: 'Microsoft Yahei'
        },
        {
          label: '宋体',
          value: '宋体'
        },
        {
          label: '隶书',
          value: '隶书'
        },
        {
          label: '楷体',
          value: '楷体'
        },
        {
          label: '幼圆',
          value: '幼圆'
        },
        {
          label: '黑体',
          value: '黑体'
        },
        {
          label: '黑体(eqxiu)',
          value: 'HT'
        },
        {
          label: '方正宋一简体',
          value: 'fangzheng_s1jt'
        },
        {
          label: '方正正黑体',
          value: 'fangzheng_zht'
        },
        {
          label: '方正书宋简体',
          value: 'fangzheng_ssjt'
        },
        {
          label: '方正准圆简体',
          value: 'Y_fangzheng_zhunyuan'
        },
        {
          label: '方正新报宋简体',
          value: 'fangzheng_xbsjt'
        },
        {
          label: '汉仪旗黑50',
          value: 'hanyi_qh50'
        },
        {
          label: '站酷高端黑',
          value: 'zhanku_gdh'
        },
        {
          label: '汉仪旗黑35',
          value: 'hanyi_qh35'
        },
        {
          label: '方正尚酷简体',
          value: 'F_rBB61z'
        }
      ]
    };
  },
  methods: {
    changeValue (value) {
      this.$emit('updateValue', {
        value,
        name: 'fontFamily'
      });
    }
  }
};
</script>
